<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
  <head>
    <title>资料</title>
    
  </head>
   <script type="text/javascript" src="${staticWebsite}js/jquery-1.7.2.js"></script>
    <link rel="stylesheet" href="${staticWebsite}css/common/personalInfo.css" type="text/css"/>
    <script type="text/javascript" src="${staticWebsite}js/thickbox.js"></script>
     <link rel="stylesheet" href="${staticWebsite}css/common/thickbox.css" type="text/css" />
     <script type="text/javascript">
       $(document).ready(function(){
         //鼠标经过触发的事件
       	  $(".info").mouseover(function(){
       	      $(this).children(".miniTitle").children(".edit").css("display", "block");
       	  });
       	  
       	  //鼠标移开触发的事件
    	  $(".info").mouseleave(function(){
    	      $(this).children(".miniTitle").children(".edit").css("display", "none");
    	  });  
       	
       	 //点击基本信息编辑按钮触发的事件
       	  $(".editBasicInfoLink").click(function(){
    	      $(this).parent().parent().parent().css("display","none");
    	      $(".editBasicInfo").css("display","block");
    	  }); 
    	  
    	  //点击学校信息编辑按钮触发的事件
       	  $(".editSchoolInfoLink").click(function(){
    	      $(this).parent().parent().parent().css("display","none");
    	      $(".editSchoolInfo").css("display","block");
    	  });
    	  
    	   //点击工作信息编辑按钮触发的事件
       	  $(".editWorkInfoLink").click(function(){
    	      $(this).parent().parent().parent().css("display","none");
    	      $(".editWorkInfo").css("display","block");
    	  });
    	  
    	  //点击个人信息编辑按钮触发的事件
       	  $(".editPersonInfoLink").click(function(){
    	      $(this).parent().parent().parent().css("display","none");
    	      $(".editPersonInfo").css("display","block");
    	  });
    	  
    	  //点击联系方式编辑按钮触发的事件
       	  $(".editContactInfoLink").click(function(){
    	      $(this).parent().parent().parent().css("display","none");
    	      $(".editContactInfo").css("display","block");
    	  });
    	  
    	  //点击编辑时的头部 
    	  $(".editMiniTitle").click(function(){
    	  var thisObj=$(this);
    	      alert(thisObj.next("table").attr("style"));
    	     if(thisObj.next("table").attr("style")=="display:none;"){
    	          thisObj.next("table").attr("style","display:block");
    	     }
    	     else{
    	    	 thisObj.next("table").attr("style","display:none");
    	     }
    	  });
    	  
    	  //点击取消编辑基本信息触发的事件 
    	   $(".cancelBasicInfo").click(function(){
    	       var thisObj=$(this);
    	      if(confirm("确定取消修改基本信息吗 ?")){
    	     	// $("#editBasicInfo").css("display","none");
    	     	 $("#editBasicInfo").css("display","none");
    	         $(".basicInfoDiv").css("display","block");
    	      }
    	      else{return false;}
    	  }); 
    	  
    	   //点击取消编辑个人信息触发的事件 
    	   $(".cancelPersonInfo").click(function(){
    	       var thisObj=$(this);
    	      if(confirm("确定取消修改个人 信息吗 ?")){
    	     	// $("#editBasicInfo").css("display","none");
    	     	 $("#editPersonInfo").css("display","none");
    	         $(".personInfoDiv").css("display","block");
    	      }
    	      else{return false;}
    	  }); 
    	  
    	   //点击取消编辑联系方式信息触发的事件 
    	   $(".cancelPersonInfo").click(function(){
    	       var thisObj=$(this);
    	      if(confirm("确定取消修改联系方式信息吗 ?")){
    	     	// $("#editBasicInfo").css("display","none");
    	     	 $("#editContactInfo").css("display","none");
    	         $(".contactInfoDiv").css("display","block");
    	      }
    	      else{return false;}
    	  }); 
    	  
    	  //点击取消编辑学校信息触发的事件 
    	   $(".cancelSchoolInfo").click(function(){
    	       var thisObj=$(this);
    	      if(confirm("确定取消修改学校信息吗 ?")){
    	     	 $("#editSchoolInfo").css("display","none");
    	         $(".schoolInfoDiv").css("display","block");
    	      }
    	      else{return false;}
    	  }); 
    	  
    	  //点击取消编辑工作信息触发的事件 
    	   $(".cancelWorkInfo").click(function(){
    	       var thisObj=$(this);
    	      if(confirm("确定取消修改工作信息吗 ?")){
    	     	 $("#editWorkInfo").css("display","none");
    	         $(".workInfoDiv").css("display","block");
    	      }
    	      else{return false;}
    	  }); 
    	  
    	  //点击保存基本信息 
    	  $(".saveBasicInfo").click(function(){
    	     $("#basicForm").submit();
    	  });
    	  
    	   //点击保存大学信息 
    	   $(".saveUniversityInfo").live("click",function(){
    	 //  alert( $(this).parent().parent().parent().parent().parent().attr("action"));
    	     $(this).parent().parent().parent().parent().parent().submit();
    	  });
    	  
    	   //点击保存工作信息 
    	  $(".saveWorkInfo").live("click",function(){
    	     $(this).parent().parent().parent().parent().parent().submit();
    	  });
    	  
    	  //点击保存个人信息 
    	  $(".savePersonInfo").click(function(){
    	    $("#personForm").submit();
    	  });
    	  
    	  //点击保存联系方式
    	  $(".saveContactInfo").click(function(){
    	    $("#contactForm").submit();
    	  });
    	  
    	  //省份下拉框值改变时，城市 相应改变
		$(".provinceId").change(function(){
				var thisObj = $(this);
					$.ajax({
						type:"post",
						data:"provinceId="+thisObj.val(),
						url:"${website}profile/profile_provinceCity.action",
						success:function(obj){
							    thisObj.next("select").html("");
						    	thisObj.next("select").html("<option value='0'>选择城市:</option>"+obj);
							}
				});
		});
		
		 //行业下拉框值改变时，行业分支 相应改变
		$(".industryId").live("change",function(){
				var thisObj = $(this);
					$.ajax({
						type:"post",
						data:"industryId="+thisObj.val(),
						url:"${website}profile/profile_industryBranchByIndustry.action",
						success:function(obj){
							    thisObj.next("select").html("");
						    	thisObj.next("select").html("<option value='0'>全部</option>"+obj);
							}
				});
		});
		
		 //职位下拉框值改变时，职位分支 相应改变
		$(".positionId").live("change",function(){
				var thisObj = $(this);
					$.ajax({
						type:"post",
						data:"positionId="+thisObj.val(),
						url:"${website}profile/profile_positonBranchByPositon.action",
						success:function(obj){
							    thisObj.next("select").html("");
						    	thisObj.next("select").html("<option value='0'>全部</option>"+obj);
							}
				});
		});
		
		//修改工作信息点击现在还在公司复选框时触发
		$(".nowIn").live("click",function(){
		    var thisObj=$(this);
		    var targetDiv=thisObj.parent().parent().next().children().children(".endDiv");
		   if($(this).attr("checked")){
		       thisObj.next("input").attr("value","1");
		       targetDiv.hide();
		   }
		   else{
		      thisObj.next("input").attr("value","0");
		      targetDiv.show();
		   }
		});
		
		
		//点击大学输入框 
		$(".universityInput").live("click",function(){
		    var thisObj=$(this);
		    $("#popHref").attr("href","${website}popLayer/popLayer_toChooseSchoolPopLayer.action?&keepThis=true&TB_iframe=true&height=500&width=700&modal=true");
		    thisObj.attr("class","universityInputNow");
		    $("#popHref").trigger('click');
		});
		
		//点击删除大学
		$(".delUniversity").live("click",function(){
		     var thisObj=$(this);
		     var universityId=$(this).attr("data");
		     if(universityId==='-1'){
		    	  alert("删除成功");
				  thisObj.parent().parent().parent().parent().remove();
				  return;
		     }
		     $.ajax({
						type:"post",
						data:"universityId="+universityId,
						url:"${website}profile/profile_ajaxDelUniversity.action",
						success:function(obj){
							   if(obj){
							      alert("删除成功");
							      thisObj.parent().parent().parent().parent().remove();
							   }
							   else{
							      alert("删除失败");
							   }
							}
				});
		});
		
		//点击删除工作信息 
		$(".delWorkInfo").live("click",function(){
		     var thisObj=$(this);
		     var workInfoId=$(this).attr("data");
		     if(workInfoId=='-1'){
		    	  alert("删除成功");
				  thisObj.parent().parent().parent().parent().remove();
				  return;
		     }
		     $.ajax({
						type:"post",
						data:"workInfoId="+workInfoId,
						url:"${website}profile/profile_ajaxDelWorkInfo.action",
						success:function(obj){
							   if(obj){
							      alert("删除成功");
							      thisObj.parent().parent().parent().parent().remove();
							   }
							   else{
							      alert("删除失败");
							   }
							}
				});
		});
		
		//点击添加大学
		$(".addUniversity").live("click",function(){
		   var thisObj=$(this);
		   var clonUniversity=$("#universityForm").clone();
		   var thisAddButton=thisObj.parent().parent().parent().parent();
		   thisAddButton.before($("#universityForm").clone());
		   thisAddButton.prev().css("display","block");
		});
		
		//点击添加工作信息
		$(".addWorkInfo").live("click",function(){
		   var thisObj=$(this);
		   var workInfoForm=$("#workInfoForm").clone();
		   var thisAddButton=thisObj.parent().parent().parent().parent();
		   thisAddButton.before($("#workInfoForm").clone());
		   thisAddButton.prev().css("display","block");
		});
		
	});
	
	   
	   function preview(attr){
	     var thisUniversity=$(".universityInputNow");
	     $(".universityInputNow").attr("value",attr[1]);
	     $(".universityInputNow").parent().parent().parent().parent().prev().attr("value",attr[0]);
	     $(".universityInputNow").parent().parent().parent().parent().prev().prev().attr("value",attr[2]);
	     $(".universityInputNow").attr("class","universityInput");
	     var universityId=attr[0];
	     $.ajax({
					type:"post",
					data:"universityId="+universityId,
					url:"${website}profile/profile_schoolAcademyDomitory.action",
					dataType:"json",
					success:function(a){
						    //alert(a.academy);
						    thisUniversity.parent().parent().next().next().children().children(".academy").html("<option value='0'>院系</option>"+a.academy);
						    thisUniversity.parent().parent().next().next().children().children(".domitory").html("<option value='0'>宿舍</option>"+a.domitory);
						    //alert(a.domitory);
						}
			});
			
	   }
     </script>
  <body>
  <!-- 显示基本信息 -->
   <div class="info basicInfoDiv">
    <div class="miniTitle">
      <div class="litterP" align="left">基本信息</div>
      <div style="display:none;" class="edit" align="right"><a href="#" class="editBasicInfoLink"><img src="${staticWebsite}image/personalInfo/litteredit.jpg"/>编辑</a></div>
    </div>
    <table>
      <tr>
        <td class="td1">性别:</td>
        <td>
          <c:choose>
             <c:when test="${basicInfo.sex==1}">男</c:when>
             <c:otherwise>女</c:otherwise>
          </c:choose>
        </td>
        </tr><tr>
        <td>生日:</td><td>${basicInfo.birthDay}</td>
        </tr><tr>
        <td>家乡:</td>
        <td>
          <c:forEach items="${provinceList}" var="i">
            <c:choose>
            <c:when test="${basicInfo.homeProvinceId==i.id}">${i.provinceName}</c:when>
            </c:choose>
          </c:forEach>
          
          <c:forEach items="${cityList}" var="i">
          <c:choose>
            <c:when test="${basicInfo.homeCityId==i.id}">${i.cityName}</c:when>
            </c:choose>
          </c:forEach>
        </td>
      </tr>
    </table>
    </div>
    
      <!-- 修改基本信息 -->
    <div class="editInfo editBasicInfo" id="editBasicInfo" style="display:none">
       <div class="editMiniTitle" style="display:block;">基本信息</div>
       <form action="${website}profile/profile_saveBasicInfo.action" id="basicForm" method="post">
        <input type="hidden" name="basicInfo.id" value="${basicInfo.id}"/>
       <table>
         <tr><td><font color="gray">*</font>姓名:</td><td><input type="text" name="basicInfo.realName" value="${basicInfo.realName}"/><font color="gray">可在中文姓名后添加英文名称</font></td></tr>
         <tr><td>昵称:</td><td><input type="text" name="basicInfo.nickName" value="${basicInfo.nickName}"/><font color="gray">只有星级用户才可使用</font></td></tr>
         <tr><td><font color="gray">*</font>性别:</td>
         	<td>
         	  <c:choose>
         	    <c:when test="${basicInfo.sex==1}">
         	  		  男<input type="radio" name="basicInfo.sex" value="1" checked="checked"/>
         	      	   女<input type="radio" name="basicInfo.sex" value="0"/>
         	    </c:when>
         	    <c:otherwise>
         	      	男<input type="radio" name="basicInfo.sex" value="1"/>
         	  		  女<input type="radio" name="basicInfo.sex" value="0" checked="checked"/>
         	    </c:otherwise>
         	  </c:choose>
         	</td>
         </tr>
         <tr><td><font color="gray">*</font>家乡:</td>
            <td>
            <select class="provinceId" name="basicInfo.homeProvinceId"> 
              <option value="0">省份</option>
             <c:forEach items="${provinceList}" var="i">
                <c:choose>
                  <c:when test="${basicInfo.homeProvinceId==i.id}"><option value="${i.id}" selected="selected">${i.provinceName}</option></c:when>
                  <c:otherwise><option value="${i.id}">${i.provinceName}</option></c:otherwise>
                </c:choose>
             </c:forEach>
             </select>
             <select name="basicInfo.homeCityId">
               <option value="0">选择城市:</option>
               <c:forEach items="${homeCityList}" var="i">
                  <c:choose>
                    <c:when test="${i.id==basicInfo.homeCityId}"><option value="${i.id}" selected="selected">${i.cityName}</option></c:when>
                    <c:otherwise><option value="${i.id}">${i.cityName}</option></c:otherwise>
                  </c:choose>
               </c:forEach>
             </select>
            </td>
         </tr>
          <tr><td><font color="gray">*</font>所在地:</td>
            <td>
            <select class="provinceId" name="basicInfo.locationProvinceId"> 
              <option value="0">省份</option>
             <c:forEach items="${provinceList}" var="i">
                <c:choose>
                  <c:when test="${basicInfo.locationProvinceId==i.id}"><option value="${i.id}" selected="selected">${i.provinceName}</option></c:when>
                  <c:otherwise><option value="${i.id}">${i.provinceName}</option></c:otherwise>
                </c:choose>
             </c:forEach>
             </select>
             <select class="cityByProvince" name="basicInfo.locationCityId">
               <option value="0">选择城市:</option>
               <c:forEach items="${locationCityList}" var="i">
                  <c:choose>
                    <c:when test="${i.id==basicInfo.locationCityId}"><option value="${i.id}" selected="selected">${i.cityName}</option></c:when>
                    <c:otherwise><option value="${i.id}">${i.cityName}</option></c:otherwise>
                  </c:choose>
               </c:forEach>
             </select>
            </td>
         </tr>
         <tr><td>生日:</td>
          <td>
            <c:choose>
             <c:when test="${basicInfo.birthType==1}">
                <input type="radio" value="1" name="basicInfo.birthType" checked="checked"/>公历生日
                <input type="radio" value="2" name="basicInfo.birthType"/>农历生日
             </c:when>
             <c:otherwise>
             	<input type="radio" value="1" name="basicInfo.birthType"/>公历生日
                <input type="radio" value="2" name="basicInfo.birthType" checked="checked"/>农历生日
             </c:otherwise>
            </c:choose>
          </td>
         </tr>
         <tr><td></td>
         <td>
          <select name="birthYear">
            <option value="0">选择年：</option>
            <c:forEach items="${yearList}" var="i">
               <c:choose>
                 <c:when test="${i.yearName==birthYear}">yearName
                 <option  value="${i.yearName}" selected="selected">${i.yearName}</option>
                 </c:when>
                 <c:otherwise>
                  <option value="${i.yearName}">${i.yearName}</option>
                 </c:otherwise>
               </c:choose>
            </c:forEach>
          </select>
          <select name="birthMonth">
            <option value="0">选择月份：</option>
             <c:forEach items="${monthList}" var="i">
               <c:choose>
                 <c:when test="${i.monthName==birthMonth}">
                 <option value="${i.monthName}" selected="selected">${i.monthName}</option>
                 </c:when>
                 <c:otherwise>
                  <option value="${i.monthName}">${i.monthName}</option>
                 </c:otherwise>
               </c:choose>
            </c:forEach>
          </select>
          <select name="birthDay">
            <option value="0">选择日期：</option>
             <c:forEach items="${dayList}" var="i">
               <c:choose>
                 <c:when test="${i.dayName==birthDay}">
                 <option value="${i.dayName}" selected="selected">${i.dayName}</option>
                 </c:when>
                 <c:otherwise>
                  <option value="${i.dayName}">${i.dayName}</option>
                 </c:otherwise>
               </c:choose>
            </c:forEach>
          </select>
         </td>
         </tr>
         <tr>
          <td>个性域名:</td><td>
          <c:choose>
           <c:when test="${basicInfo.domainName==''}"><a href="#">立即抢注属于自己的个性域名，如yourname.renren.com</a></c:when>
           <c:otherwise><input type="text" name="basicInfo.domainName" value="${basicInfo.domainName}"/> </c:otherwise>
          </c:choose>
          </td>
         </tr>
         <tr>
          <td>在个人主页显示:</td><td>可设置所在地及通过认证的资料信息</td>
         </tr>
         <tr>
         <td></td>
         <td>
          <select>
           <option>东北师范大学</option>
           <option>赣州</option>
          </select>
         </td>
         </tr>
         <tr>
           <td></td><td><a href="#" class="saveBasicInfo"><img src="${staticWebsite}image/personalInfo/saveEdit.jpg"/></a><a href="" class="cancelBasicInfo"><img src="${staticWebsite}image/personalInfo/giveUp.jpg"/></a></td>
         </tr>
          <tr>
           <td></td><td><a href="#">修改个人隐私设置</a></td>
         </tr>
       </table>
       </form>
    </div>
    
     <!-- 显示学校信息 -->
     <div class="info">
    <div class="miniTitle">
           <div class="litterP" align="left"> 学校信息</div>
           <div style="display:none" class="edit" align="right"><a href="#"  class="editSchoolInfoLink"><img src="${staticWebsite}image/personalInfo/litteredit.jpg"/>编辑</a></div>
    </div>
    <table>
     <tr>
     <td>大学:</td>
     <td>
       <c:forEach items="${universityInfoList}" var="i">
          <c:forEach items="${universityList}" var="j">
              <c:choose>
                <c:when test="${j.id==i.universityId}"><a href="#">${j.universityName}</a></c:when>
              </c:choose>
          </c:forEach>
          -<a href="#">${i.startYear}年</a>-
          <c:forEach items="${academyList}" var="j">
              <c:choose>
                <c:when test="${j.id==i.academyId}"><a href="#">${j.academyName}</a></c:when>
              </c:choose>
          </c:forEach>
       </c:forEach>
     </td>
     </tr>
     <tr>
     <td>高中:</td>
     <td>
       <c:forEach items="${seniorInfoList}" var="i">
          <c:forEach items="${seniorList}" var="j">
              <c:choose>
                <c:when test="${j.id==i.seniorSchoolId}"><a href="#">${j.seniorName}</a></c:when>
              </c:choose>
          </c:forEach>
          -<a href="#">${i.startYear}年</a>
       </c:forEach>
     </td>
     </tr>
      <tr>
     <td>中专技校:</td>
     <td>
       <c:forEach items="${technicalSchoolInfoList}" var="i">
          <c:forEach items="${technicalSchoolList}" var="j">
              <c:choose>
                <c:when test="${j.id==i.technicalSchoolId}"><a href="#">${j.technicalSchoolName}</a></c:when>
              </c:choose>
          </c:forEach>
          -<a href="#">${i.startYear}年</a>
       </c:forEach>
     </td>
     </tr>
     <tr>
     <td>初中:</td>
     <td>
       <c:forEach items="${juniorInfoList}" var="i">
          <c:forEach items="${juniorList}" var="j">
              <c:choose>
                <c:when test="${j.id==i.juniorSchoolId}"><a href="#">${j.juniorName}</a></c:when>
              </c:choose>
          </c:forEach>
          -<a href="#">${i.startYear}年</a>
       </c:forEach>
     </td>
     </tr>
      <tr>
     <td>小学:</td>
     <td>
       <c:forEach items="${primaryInfoList}" var="i">
          <a href="#">${i.primarySchoolName}</a>
          -${i.startYear}年
       </c:forEach>
     </td>
     </tr>
    </table>
    </div>
    
     <!-- 修改学校信息 -->
      <div class="editInfo editSchoolInfo" id="editSchoolInfo" style="display:none">
       <div class="editMiniTitle" style="display:block;">学校信息</div>
       
       <!-- 修改大学信息 -->
       <c:forEach items="${universityInfoList}" var="i">
       <form method="post" action="${website}profile/profile_saveUniversityInfo.action">
       <input type="hidden" name="universityInfo.id" value="${i.id}"/>
       <input type="hidden" name="universityInfo.provinceId" value="${i.provinceId}"/>
       <input type="hidden" name="universityInfo.universityId" value="${i.universityId}"/>
        <table>
          <tr>
           <td>大学:</td>
           <td>
               <c:forEach items="${universityList}" var="j">
                  <c:choose>
                     <c:when test="${i.universityId==j.id}"><input type="text" value="${j.universityName}" class="universityInput"/></c:when>
                  </c:choose>
               </c:forEach>
               
               <select name="universityInfo.startYear">
               <option value="0">入学年份</option>
               <c:forEach items="${yearList}" var="j">
                   <c:choose>
                     <c:when test="${j.yearName==i.startYear}"><option value="${j.yearName}" selected="selected">${j.yearName}</option></c:when>
                     <c:otherwise><option value="${j.yearName}">${j.yearName}</option></c:otherwise>
                   </c:choose>
               </c:forEach>
               </select>
           </td>
          </tr>
          <tr>
           <td>身份:</td>
           <td>
             <select name="universityInfo.identifyId">
               <option value="0">请选择类型</option>
               <c:forEach items="${identifyList}" var="j">
                  <c:choose>
                     <c:when test="${j.id==i.identifyId}"><option value="${j.id}" selected="selected">${j.identifyName}</option></c:when>
                     <c:otherwise><option value="${j.id}">${j.identifyName}</option></c:otherwise>
                  </c:choose>
               </c:forEach>
             </select>
           </td>
          </tr>
          <tr>
           <td>院系:</td>
           <td>
              <select name="universityInfo.academyId" class="academy">
              <option value="0">院系</option>
              <c:forEach items="${academyMap}" var="aMap">
                <c:choose>
                    <c:when test="${aMap.key==i.id}">
                       <c:forEach items="${aMap.value}" var="m">
                          <c:choose>
                             <c:when test="${m.id==i.academyId}"><option value="${m.id}" selected="selected">${m.academyName}</option></c:when>
                             <c:otherwise><option value="${m.id}" >${m.academyName}</option></c:otherwise>
                          </c:choose>
                       </c:forEach>
                    </c:when>
                </c:choose>
              </c:forEach>
              </select>
              
              <select name="universityInfo.domitoryId" class="domitory">
              <option value="0">宿舍</option>
              <c:forEach items="${domitoryMap}" var="dMap">
                <c:choose>
                    <c:when test="${dMap.key==i.id}">
                       <c:forEach items="${dMap.value}" var="m">
                          <c:choose>
                             <c:when test="${m.id==i.domitoryId}"><option value="${m.id}" selected="selected">${m.domitoryName}</option></c:when>
                             <c:otherwise><option value="${m.id}" >${m.domitoryName}</option></c:otherwise>
                          </c:choose>
                       </c:forEach>
                    </c:when>
                </c:choose>
              </c:forEach>
              </select>
           </td>
          </tr>
           <tr><td></td><td><a href="#" class="saveUniversityInfo"><img src="${staticWebsite}image/personalInfo/saveEdit.jpg"/></a><a href="#" class="delUniversity" data="${i.id}">删除这个大学</a></td></tr>
        </table>
        </form>
        </c:forEach>
        <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><a href="#" class="addUniversity">添加大学</a></td></tr></table>
        
        <!-- 修改高中信息 -->
        <c:forEach items="${seniorInfoList}" var="i">
            <table>
              <tr>
                <td>高中:</td>
                <td>
                   <c:forEach items="${seniorList}" var="j">
                       <c:choose>
                         <c:when test="${j.id==i.seniorSchoolId}"><input type="text" value="${j.seniorName}"/></c:when>
                       </c:choose>
                   </c:forEach>
                   <select>
                   <option value="0">入学年份</option>
                   <c:forEach items="${yearList}" var="j">
                       <c:choose>
                         <c:when test="${j.yearName==i.startYear}"><option value="${j.yearName}" selected="selected">${j.yearName}</option></c:when>
                         <c:otherwise><option value="${j.yearName}">${j.yearName}</option></c:otherwise>
                       </c:choose>
                   </c:forEach>
                   </select>
                </td>
              </tr>
              <tr>
                <td>班级:</td>
                <td>高一<input type="text" value="${i.classYear1}"/></td>
              </tr>
              <tr>
                <td>&nbsp;&nbsp;&nbsp;</td>
                <td>高二<input type="text" value="${i.classYear2}"/></td>
              </tr>
              <tr>
                <td>&nbsp;&nbsp;&nbsp;</td>
                <td>高三<input type="text" value="${i.classYear3}"/></td>
              </tr> 
              <tr><td></td><td><a href="">删除这个高中</a></td></tr>
            </table>
        </c:forEach>
         <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><a href="">添加高中</a></td></tr></table>
         
         <!-- 修改中专技校信息 -->
         <c:forEach items="${technicalSchoolInfoList}" var="i">
            <table>
              <tr>
                <td>中专技校:</td>
                <td>
                   <c:forEach items="${technicalSchoolList}" var="j">
                       <c:choose>
                         <c:when test="${j.id==i.technicalSchoolId}"><input type="text" value="${j.technicalSchoolName}"/></c:when>
                       </c:choose>
                   </c:forEach>
                   <select>
                   <option value="0">入学年份</option>
                   <c:forEach items="${yearList}" var="j">
                       <c:choose>
                         <c:when test="${j.yearName==i.startYear}"><option value="${j.yearName}" selected="selected">${j.yearName}</option></c:when>
                         <c:otherwise><option value="${j.yearName}">${j.yearName}</option></c:otherwise>
                       </c:choose>
                   </c:forEach>
                   </select>
                </td>
                <td><a href="">删除</a></td>
              </tr>
            </table>
        </c:forEach>
         <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><a href="">添加中专技校</a></td></tr></table>
         
           <!-- 修改初中信息 -->
         <c:forEach items="${juniorInfoList}" var="i">
            <table>
              <tr>
                <td>初中:</td>
                <td>
                   <c:forEach items="${juniorList}" var="j">
                       <c:choose>
                         <c:when test="${j.id==i.juniorSchoolId}"><input type="text" value="${j.juniorName}"/></c:when>
                       </c:choose>
                   </c:forEach>
                   <select>
                   <option value="0">入学年份</option>
                   <c:forEach items="${yearList}" var="j">
                       <c:choose>
                         <c:when test="${j.yearName==i.startYear}"><option value="${j.yearName}" selected="selected">${j.yearName}</option></c:when>
                         <c:otherwise><option value="${j.yearName}">${j.yearName}</option></c:otherwise>
                       </c:choose>
                   </c:forEach>
                   </select>
                </td>
                <td><a href="">删除</a></td>
              </tr>
            </table>
        </c:forEach>
         <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><a href="">添加初中</a></td></tr></table>
         
           <!-- 修改小学信息 -->
         <c:forEach items="${primaryInfoList}" var="i">
            <table>
              <tr>
                <td>小学:</td>
                <td>
                   <input type="text" value="${i.primarySchoolName}"/>
                   <select>
                   <option value="0">入学年份</option>
                   <c:forEach items="${yearList}" var="j">
                       <c:choose>
                         <c:when test="${j.yearName==i.startYear}"><option value="${j.yearName}" selected="selected">${j.yearName}</option></c:when>
                         <c:otherwise><option value="${j.yearName}">${j.yearName}</option></c:otherwise>
                       </c:choose>
                   </c:forEach>
                   </select>
                </td>
                <td><a href="">删除</a><input type="submit" value="保存"/></td>
              </tr>
            </table>
        </c:forEach>
         <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><a href="">添加小学</a></td></tr></table>
         <div align="left"><a href="" class="cancelSchoolInfo"><img src="${staticWebsite}image/personalInfo/giveUp.jpg"/></a></div>
      </div>
      
      
     <div class="info">
    <div class="miniTitle">
        <div class="litterP" align="left">工作信息</div> 
        <div style="display:none" class="edit" align="right"><a href="#"  class="editWorkInfoLink"><img src="${staticWebsite}image/personalInfo/litteredit.jpg"/>编辑</a></div>
    </div>
    <table>
     
      <c:forEach items="${workInfoList}" var="i">
       <tr>
        <td class="td1">公司:</td>
        <td>
          ${i.companyName}
        </td>
        </tr><tr>
         <td>时间:</td>
        <td>
           ${i.startYear}年-${i.startMonth}月 &nbsp;至&nbsp; ${i.endYear}年-${i.endMonth}月 
        </td>
        </tr>
      </c:forEach>
      </table>
      </div>
      
       <!-- 修改工作信息 -->
      <div class="editInfo editWorkInfo" id="editWorkInfo" style="display:none">
       <div class="editMiniTitle" style="display:block;">工作信息</div>
          <c:forEach items="${workInfoList}" var="i">
             <form action="${website}profile/profile_saveWorkInfo.action" method="post">
               <input type="hidden" name="workInfo.id" value="${i.id}"/>
               <table>
                  <tr>
                    <td>公司名称:</td>
                    <td><input name="workInfo.companyName" value="${i.companyName}" type="text"/></td>
                  </tr>
                  <tr>
                    <td>行业:</td>
                    <td>
                      <select name="workInfo.industryId" class="industryId">
                         <option value="0">请选择行业</option>
                         <c:forEach items="${industryList}" var="j">
		                  <c:choose>
		                     <c:when test="${j.id==i.industryId}"><option value="${j.id}" selected="selected">${j.industryName}</option></c:when>
		                     <c:otherwise><option value="${j.id}">${j.industryName}</option></c:otherwise>
		                  </c:choose>
		                </c:forEach>
                      </select>
                       <select name="workInfo.industryBranchId">
                         <option value="0">全部</option>
                           <c:forEach items="${industryBranchMap}" var="iMap">
			                <c:choose>
			                    <c:when test="${iMap.key==i.id}">
			                       <c:forEach items="${iMap.value}" var="m">
			                          <c:choose>
			                             <c:when test="${m.id==i.industryBranchId}"><option value="${m.id}" selected="selected">${m.industryBranchName}</option></c:when>
			                             <c:otherwise><option value="${m.id}" >${m.industryBranchName}</option></c:otherwise>
			                          </c:choose>
			                       </c:forEach>
			                    </c:when>
			                </c:choose>
			              </c:forEach>
                      </select>
                    </td>
                  </tr>
                  <tr>
                    <td>职位:</td>
                    <td>
                     <select name="workInfo.positionId" class="positionId">
                         <option value="0">请选择职位</option>
                          <c:forEach items="${positionList}" var="j">
		                  <c:choose>
		                     <c:when test="${j.id==i.positionId}"><option value="${j.id}" selected="selected">${j.positionName}</option></c:when>
		                     <c:otherwise><option value="${j.id}">${j.positionName}</option></c:otherwise>
		                  </c:choose>
		                </c:forEach>
                      </select>
                     <select name="workInfo.positionBranchId" class="positionBranch">
                         <option value="0">全部</option>
                          <c:forEach items="${positionBranchMap}" var="pMap">
			                <c:choose>
			                    <c:when test="${pMap.key==i.id}">
			                       <c:forEach items="${pMap.value}" var="m">
			                          <c:choose>
			                             <c:when test="${m.id==i.positionBranchId}"><option value="${m.id}" selected="selected">${m.positionBranchName}</option></c:when>
			                             <c:otherwise><option value="${m.id}" >${m.positionBranchName}</option></c:otherwise>
			                          </c:choose>
			                       </c:forEach>
			                    </c:when>
			                </c:choose>
			              </c:forEach>
                      </select>
                    </td>
                  </tr>
                  <tr>
                    <td>工作时间:</td>
                    <td>
                    <c:choose>
                      <c:when test="${i.nowIn==1}"><input type="checkbox" checked="checked" class="nowIn"/>现在这家公司</c:when>
                      <c:otherwise><input type="checkbox"  class="nowIn"/>现在这家公司</c:otherwise>
                    </c:choose>
                     <input name="workInfo.nowIn" value="${i.nowIn}" type="hidden"/>
                    </td>
                  </tr>
                  <tr>
                    <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                    <td>
                    <div class="startDiv" style="float:left">
                      <select name="workInfo.startYear">
                      <option value="0">年份:</option>
                      <c:forEach items="${yearList}" var="j">
                        <c:choose>
                           <c:when test="${j.yearName==i.startYear}"><option value="${j.yearName}" selected="selected">${j.yearName}</option></c:when>
                           <c:otherwise><option value="${j.yearName}">${j.yearName}</option></c:otherwise>
                        </c:choose>
                      </c:forEach>
                      </select>
                      <select name="workInfo.startMonth">
                      <option value="0">月份:</option>
                      <c:forEach items="${monthList}" var="j">
                        <c:choose>
                           <c:when test="${j.monthName==i.startMonth}"><option value="${j.monthName}" selected="selected">${j.monthName}</option></c:when>
                           <c:otherwise><option value="${j.monthName}">${j.monthName}</option></c:otherwise>
                        </c:choose>
                      </c:forEach>
                      </select>到
                      </div>
                      
                       <c:choose>
	                      <c:when test="${i.nowIn==1}"> <div class="endDiv" style="float:left;display:none;"></c:when>
	                      <c:otherwise><div class="endDiv" style="float:left;display:block;"></c:otherwise>
	                    </c:choose>                        
                  
                       <select name="workInfo.endYear">
                      <option value="0">年份:</option>
                      <c:forEach items="${yearList}" var="j">
                        <c:choose>
                           <c:when test="${j.yearName==i.endYear}"><option value="${j.yearName}" selected="selected">${j.yearName}</option></c:when>
                           <c:otherwise><option value="${j.yearName}">${j.yearName}</option></c:otherwise>
                        </c:choose>
                      </c:forEach>
                      </select>
                      <select name="workInfo.endMonth">
                      <option value="0">月份:</option>
                      <c:forEach items="${monthList}" var="j">
                        <c:choose>
                           <c:when test="${j.monthName==i.endMonth}"><option value="${j.monthName}" selected="selected">${j.monthName}</option></c:when>
                           <c:otherwise><option value="${j.monthName}">${j.monthName}</option></c:otherwise>
                        </c:choose>
                      </c:forEach>
                      </select>
                      </div>
                    </td>
                  </tr>
                  <tr><td></td><td><a href="#" class="saveWorkInfo"><img src="${staticWebsite}image/personalInfo/saveEdit.jpg"/></a><a href="#" class="delWorkInfo" data="${i.id}">删除这个公司</a></td></tr>
               </table>
             </form>
          </c:forEach>
            <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><a href="#" class="addWorkInfo">添加公司</a></td></tr></table>
            <div align="left"><a href="" class="cancelWorkInfo"><img src="${staticWebsite}image/personalInfo/giveUp.jpg"/></a></div>
       </div>
      
       <div class="info">
    <div class="miniTitle">
         <div class="litterP" align="left">个人信息</div>
         <div style="display:none" class="edit" align="right"><a href="#" class="editPersonInfoLink"><img src="${staticWebsite}image/personalInfo/litteredit.jpg"/>编辑</a></div>
    </div>
    <table>
     <tr><td class="td1">兴趣爱好:</td><td>${personalInfo.hobbyDscib}</td></tr>
     <tr><td>喜欢音乐:</td><td>${personalInfo.likeMusicDscib}</td></tr>
     <tr><td>喜欢电影:</td><td>${personalInfo.likeMovieDscib}</td></tr>
     <tr><td>玩的游戏:</td><td>${personalInfo.likeGameDscib}</td></tr>
     <tr><td>喜欢动漫:</td><td>${personalInfo.likeCartoonDscib}</td></tr>
     <tr><td>玩的运动:</td><td>${personalInfo.likeSportsDscib}</td></tr>
     <tr><td>喜欢书籍:</td><td>${personalInfo.likeBookDscib}</td></tr>
    </table>
    </div>
    
    <!-- 修改个人信息 -->
    <div class="editInfo editPersonInfo" id="editPersonInfo" style="display:none">
       <div class="editMiniTitle" style="display:block;">个人信息</div>
       <form action="${website}profile/profile_savePersonInfo.action" method="post" id="personForm">
       <input type="hidden" name="personalInfo.id" value="${personalInfo.id}"/>
       <div class="personDesc">
         <div>兴趣爱好:</div>
         <div> <textarea name="personalInfo.hobbyDscib" rows="6" cols="100">${personalInfo.hobbyDscib}</textarea></div>
       </div>
       <div class="personDesc">
       	<div>喜欢的音乐:</div>
         <div> <textarea name="personalInfo.likeMusicDscib" rows="6" cols="100">${personalInfo.likeMusicDscib}</textarea></div>
       </div>
       <div class="personDesc">
       <div>喜欢的电影:</div>
         
        <div><textarea name="personalInfo.likeMovieDscib" rows="6" cols="100">${personalInfo.likeMovieDscib}</textarea></div>
       </div>
       <div class="personDesc">
       <div>喜欢的游戏:</div>
         <div> <textarea name="personalInfo.likeGameDscib" rows="6" cols="100">${personalInfo.likeGameDscib}</textarea></div>
       </div>
       <div class="personDesc">
       <div>喜欢的动漫：</div>
          <div><textarea name="personalInfo.likeCartoonDscib" rows="6" cols="100">${personalInfo.likeCartoonDscib}</textarea></div>
       </div>
       <div class="personDesc">
       <div>喜欢的运动:</div>
         <div> <textarea name="personalInfo.likeSportsDscib" rows="6" cols="100">${personalInfo.likeSportsDscib}</textarea></div>
       </div>
       <div class="personDesc">
       <div>喜欢的书籍:</div>
         <div> <textarea name="personalInfo.likeBookDscib" rows="6" cols="100">${personalInfo.likeBookDscib}</textarea></div>
       </div>
       <div><a href="#" class="savePersonInfo"><img src="${staticWebsite}image/personalInfo/saveEdit.jpg"/></a><a href="" class="cancelPersonInfo"><img src="${staticWebsite}image/personalInfo/giveUp.jpg"/></a></div> 
      </form>
    </div>
    
     <div class="info">
    <div class="miniTitle">
        <div class="litterP" align="left">  联系方式</div>
         <div style="display:none" class="edit" align="right"><a href="#" class="editContactInfoLink"><img src="${staticWebsite}image/personalInfo/litteredit.jpg"/>编辑</a></div>
    </div>
    <table>
     <tr><td class="td1">QQ:</td><td>${contactInfo.qq}</td></tr>
     <tr><td>MSN:</td><td>${contactInfo.msn}</td></tr>
     <tr><td>手机号:</td><td>${contactInfo.tel}</td></tr>
     <tr><td>个人网站:</td><td>${contactInfo.personalWebsite}</td></tr>
    </table>
    </div>
    
      <!-- 修改联系方式 -->
    <div class="editInfo editContactInfo" id="editContactInfo" style="display:none">
      <form action="${website}profile/profile_saveContactInfo.action" method="post" id="contactForm">
       <input type="hidden" name="contactInfo.id" value="${contactInfo.id}"/>
       <div class="editMiniTitle" style="display:block;">联系方式</div>
        <table>
       <tr><td>QQ号码:</td><td><input name="contactInfo.qq" value="${contactInfo.qq}" type="text"/></td></tr>
        <tr><td>MSN:</td><td><input name="contactInfo.msn" value="${contactInfo.msn}" type="text"/></td></tr>
       <tr><td>手机号码:</td><td><input name="contactInfo.tel" value="${contactInfo.tel}" type="text"/></td></tr>
        <tr><td>个人网站:</td><td><input name="contactInfo.personalWebsite" value="${contactInfo.personalWebsite}" type="text"/></td></tr>
        </table>
        <div><a href="#" class="saveContactInfo"><img src="${staticWebsite}image/personalInfo/saveEdit.jpg"/></a><a href="" class="cancelContactInfo"><img src="${staticWebsite}image/personalInfo/giveUp.jpg"/></a></div> 
       </form>
     </div>
    
    
    
    <div style="display:none"><a href="" id="popHref" class="thickBox"></a></div>
    
    <!-- 大学模版 -->
    <form method="post" action="${website}profile/profile_saveUniversityInfo.action" id="universityForm" style="display:none">
       <input type="hidden" name="universityInfo.provinceId" value=""/>
       <input type="hidden" name="universityInfo.universityId" value=""/>
        <table>
          <tr>
           <td>大学:</td>
           <td>
               <input type="text" value="" class="universityInput"/>
               
               <select name="universityInfo.startYear">
               <option value="0">入学年份</option>
               <c:forEach items="${yearList}" var="j">
                     <option value="${j.yearName}">${j.yearName}</option>
               </c:forEach>
               </select>
           </td>
          </tr>
          <tr>
           <td>身份:</td>
           <td>
             <select name="universityInfo.identifyId">
               <option value="0">请选择类型</option>
               <c:forEach items="${identifyList}" var="j">
                     <option value="${j.id}">${j.identifyName}</option>
               </c:forEach>
             </select>
           </td>
          </tr>
          <tr>
           <td>院系:</td>
           <td>
              <select name="universityInfo.academyId" class="academy">
              <option value="0">院系</option>
              </select>
              
              <select name="universityInfo.domitoryId" class="domitory">
              <option value="0">宿舍</option>
              </select>
           </td>
          </tr>
           <tr><td></td><td><a href="#" class="saveUniversityInfo"><img src="${staticWebsite}image/personalInfo/saveEdit.jpg"/></a><a href="#" class="delUniversity" data="-1">删除这个大学</a></td></tr>
        </table>
        </form>
        
        <!-- 公司模版 -->
        <form id="workInfoForm" action="${website}profile/profile_saveWorkInfo.action" method="post" style="display:none">
               <table>
                  <tr>
                    <td>公司名称:</td>
                    <td><input name="workInfo.companyName" value="" type="text"/></td>
                  </tr>
                  <tr>
                    <td>行业:</td>
                    <td>
                      <select name="workInfo.industryId" class="industryId">
                         <option value="0">请选择行业</option>
                         <c:forEach items="${industryList}" var="j">
		                  <c:choose>
		                     <c:when test="${j.id==i.industryId}"><option value="${j.id}" selected="selected">${j.industryName}</option></c:when>
		                     <c:otherwise><option value="${j.id}">${j.industryName}</option></c:otherwise>
		                  </c:choose>
		                </c:forEach>
                      </select>
                       <select name="workInfo.industryBranchId">
                         <option value="0">全部</option>
                      </select>
                    </td>
                  </tr>
                  <tr>
                    <td>职位:</td>
                    <td>
                     <select name="workInfo.positionId" class="positionId" id="positionId">
                         <option value="0">请选择职位</option>
                          <c:forEach items="${positionList}" var="j">
		                  <c:choose>
		                     <c:when test="${j.id==i.positionId}"><option value="${j.id}" selected="selected">${j.positionName}</option></c:when>
		                     <c:otherwise><option value="${j.id}">${j.positionName}</option></c:otherwise>
		                  </c:choose>
		                </c:forEach>
                      </select>
                    
                     <select  class="positionBranch" name="workInfo.positionBranchId">
                         <option value="0">全部</option>
                      </select>
                    </td>
                  </tr>
                   <tr>
                    <td>工作时间:</td>
                    <td>
                    <input type="checkbox" class="nowIn"/>现在这家公司
                     <input name="workInfo.nowIn" value="0" type="hidden"/>
                    </td>
                  </tr>
                  <tr>
                    <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                    <td>
                    <div class="startDiv" style="float:left">
                      <select name="workInfo.startYear">
                      <option value="0">年份:</option>
                      <c:forEach items="${yearList}" var="j">
                       <option value="${j.yearName}">${j.yearName}</option>
                      </c:forEach>
                      </select>
                      <select name="workInfo.startMonth">
                      <option value="0">月份:</option>
                      <c:forEach items="${monthList}" var="j">
                       <option value="${j.monthName}">${j.monthName}</option>
                      </c:forEach>
                      </select>到
                      </div>
                      
                      <div class="endDiv" style="float:left;display:block;">                      
                       <select name="workInfo.endYear">
                      <option value="0">年份:</option>
                      <c:forEach items="${yearList}" var="j">
                        <option value="${j.yearName}">${j.yearName}</option>
                      </c:forEach>
                      </select>
                      <select name="workInfo.endMonth">
                      <option value="0">月份:</option>
                      <c:forEach items="${monthList}" var="j">
                       <option value="${j.monthName}">${j.monthName}</option>
                      </c:forEach>
                      </select>
                      </div>
                    </td>
                  </tr>
                  <tr><td></td><td><a href="#" class="saveWorkInfo"><img src="${staticWebsite}image/personalInfo/saveEdit.jpg"/></a><a href="#" class="delWorkInfo" data="-1">删除这个公司</a></td></tr>
               </table>
             </form>
  </body>
</html>
